<table border=0 cellpadding=0 cellspacing=0>
	<tr>
		<td><? $kernelStrings.amgr_access_label|cat:":" ?></td>
	</tr>
	<tr><td class=smallFont>&nbsp;</td></tr>
</table>

<div style="overflow: auto; width: 580px; height: 280px" class=framearea>

	<table cellpadding=0 cellspacing=0 border=0 width="100%" class="complexList noborders">
		<!-- Personal settings section -->
		<tr class=listSubheader>
			<td><strong><? $kernelStrings.amu_perssettings_title ?></strong></td>
			<td colspan=3 class=leftBorder>&nbsp;</td>
		</tr>
		<tr>
			<td height=5></td>
			<td colspan=3 class=leftBorder>&nbsp;</td>
		</tr>

		<!-- Change password -->
		<tr>
			<td class=accessItem><? $kernelStrings.amu_perspassword_label ?></td>
			<td align=center valign=top colspan=3 class=leftBorder><input type=checkbox value=1 name="groupData[changePasssRight]" <? switchedOutput val=$groupData.changePasssRight true_val=1 str1="checked" ?>></td>
		</tr>

		<!-- Change look and feel -->
		<tr>
			<td class=accessItem><? $kernelStrings.amu_perslookandfeel_label ?></td>
			<td align=center valign=top colspan=3 class=leftBorder><input type=checkbox value=1 name="groupData[changeTemplateRight]" <? switchedOutput val=$groupData.changeTemplateRight true_val=1 str1="checked" ?>></td>
		</tr>

		<!-- Name and contacts -->
		<tr>
			<td class=accessItem><? $kernelStrings.amu_persnameandcont_label ?></td>
			<td align=center valign=top colspan=3 class=leftBorder><input type=checkbox value=1 name="groupData[changeNameRight]" <? switchedOutput val=$groupData.changeNameRight true_val=1 str1="checked" ?>></td>
		</tr>

		<!-- Enable/Disable email notifications --->
		<tr>
			<td class=accessItem><? $kernelStrings.amu_persswitchemail_label ?></td>
			<td align=center valign=top colspan=3 class=leftBorder><input type=checkbox value=1 name="groupData[switchEmailRight]" <? switchedOutput val=$groupData.switchEmailRight true_val=1 str1="checked" ?>></td>
		</tr>

		<!-- Direct access section -->
		<tr>
			<td>&nbsp;</td>
			<td colspan=3 class=leftBorder>&nbsp;</td>
		</tr>
		<tr class=listSubheader>
			<td><strong><? $kernelStrings.amu_directaccess_title ?></strong></td>
			<td colspan=3 class=leftBorder>&nbsp;</td>
		</tr>
		<tr>
			<td height=5></td>
			<td colspan=3 class=leftBorder>&nbsp;</td>
		</tr>

		<tr>
			<td class=accessItem valign=top>
				<p><? $kernelStrings.amu_diraccess_text ?></p>
				<p class=smallFont><? $kernelStrings.amu_directaccess_text ?></p>
			</td>
			<td align=center valign=top colspan=3 class=leftBorder><input type=checkbox name="groupData[ALLOW_DRACCESS]" value=1 <? switchedOutput val=$groupData.ALLOW_DRACCESS true_val=1 str1="checked" ?>></td>
		</tr>

		<tr>
			<td>&nbsp;</td>
			<td colspan=3 class=leftBorder>&nbsp;</td>
		</tr>

	<!-- Applications settings -->
		<? foreach from=$appObjectList key=app_id item=app_data name=apploop ?>

			<!-- Application name -->
			<tr class=listSubheader>
				<td><strong><? appName APP_ID=$app_id language=$language ?></strong></td>
				<td colspan=3 class=leftBorder>&nbsp;</td>
			</tr>
			<tr>
				<td height=5></td>
				<td colspan=3 class=leftBorder>&nbsp;</td>
			</tr>

			<!-- Application screens -->
			<? foreach from=$app_data.PAGES key=scr_id item=var name=pageloop ?>
				<tr>
					<td class="smallFont accessItem"><? scrName APP_ID=$app_id SCR_ID=$scr_id language=$language ?></td>
					<td align=center valign=top colspan=3 class=leftBorder><input name="access_cb[<? $app_id  ?>][<? $scr_id ?>]" value="1" type="checkbox" <? switchedOutput val=$var true_val=1 str1="checked" ?>></td>
				</tr>
			<? /foreach ?>

			<!-- Auxiliary rights -->
			<? foreach from=$app_data.AUXRIGHTS item=var ?>
				<? assign var=rightId value=$var.ID ?>
				<tr>
					<td class="smallFont accessItem"><? $var.NAME ?></td>
					<td align=center valign=top colspan=3 class=leftBorder><input name="auxrights_cb[<? $app_id  ?>][<? $rightId ?>]" value="1" type="checkbox" <? switchedOutput val=$auxrights_cb.$app_id.$rightId true_val=1 str1="checked" ?>></td>
				</tr>
			<? /foreach ?>

			<!-- Application notifications -->
			<? foreach from=$app_data.MAIL key=mn_id item=var ?>
				<tr>
					<td class="smallFont accessItem"><? mnName APP_ID=$app_id mnID=$mn_id language=$language ?></td>
					<td align=center valign=top colspan=3 class=leftBorder><input name="mail_cb[<? $app_id  ?>][<? $mn_id ?>]" value="1" type="checkbox" <? switchedOutput val=$var true_val=1 str1="checked" ?>></td>
				</tr>
			<? /foreach ?>

			<!-- Tree/document applications settings -->

			<? if $app_data.FOLDERS != "NOFOLDERS" ?>
				<? assign var=folders value=$app_data.FOLDERS ?>
				<? count assign=settingsNum var=$folders ?>

				<!-- Additional tree/document parameters -->
				<tr>
					<td class="smallFont accessItem"><?$kernelStrings.app_treerootfolders_label?></td>
					<td align=center valign=top colspan=3 class=leftBorder><input name="canCreateRoot[<? $app_id ?>]" type="checkbox" value=1 <? switchedOutput val=$canCreateRoot.$app_id true_val=1 str1="checked"?>></td>
				</tr>

				<tr>
					<td class="smallFont accessItem"><?$kernelStrings.app_treeflduserscb_label?></td>
					<td align=center valign=top colspan=3 class=leftBorder><input name="showSharedPanel[<? $app_id ?>]" type="checkbox" value=1 <? switchedOutput val=$showSharedPanel.$app_id true_val=1 str1="checked"?>></td>
				</tr>

				<tr>
					<td>&nbsp;</td>
					<td colspan=3 class=leftBorder>&nbsp;</td>
				</tr>

				<!-- Application folders header -->
				<tr class="listSubheader">
					<td class="appFoldersHeader bottomBorder"><b><? appName APP_ID=$app_id language=$language ?><? " "|cat:$kernelStrings.usa_folders_title ?></b></td>
					<td colspan=3 class="bottomBorder leftBorder">&nbsp;
						<!-- Init application rights container -->

						<script language=JavaScript>
							var <? "appRightsControl"|cat:$app_id ?> = new appRightsContrainer();
						</script>
					</td>
				</tr>

				<tr class=listSubheader>
					<td class=accessItem><? $kernelStrings.app_treefurfldname_title ?></td>
					<td width=50 align=center class=leftBorder><nobr><input onClick="<? "appRightsControl"|cat:$app_id|cat:".setAppRights(this, 0)" ?>" name="userRightsCBAll[0]" type="checkbox" value="1"><br><span class=smallFont><? $kernelStrings.app_treeread_label ?></span></nobr></td>
					<td width=50 align=center><nobr><input onClick="<? "appRightsControl"|cat:$app_id|cat:".setAppRights(this, 1)" ?>" name="userRightsCBAll[1]" type="checkbox" value="1"><br><span class=smallFont><? $kernelStrings.app_treewrite_label ?></span></nobr></td>
					<td width=50 align=center><nobr><input onClick="<? "appRightsControl"|cat:$app_id|cat:".setAppRights(this, 2)" ?>" name="userRightsCBAll[2]" type="checkbox" value="1"><br><span class=smallFont><? $kernelStrings.app_treefolder_label ?></span></nobr></td>
				</tr>

				<tr>
					<td height=5></td>
					<td colspan=3 class=leftBorder>&nbsp;</td>
				</tr>

				<!-- Folder list -->
				<? foreach from=$folders key=DF_ID item=folderData name=folderLoop ?>
						<? math equation="15 + offset*10" offset=$folderData->OFFSET assign="padding" ?>

						<!-- Add application checkbox IDs to the application rights container -->

						<script language=JavaScript>
							<? "appRightsControl"|cat:$app_id|cat:".addCheckbox(0, '"|cat:"userRightsCB["|cat:$app_id|cat:"]["|cat:$DF_ID|cat:"][0]')" ?>
							<? "appRightsControl"|cat:$app_id|cat:".addCheckbox(1, '"|cat:"userRightsCB["|cat:$app_id|cat:"]["|cat:$DF_ID|cat:"][1]')" ?>
							<? "appRightsControl"|cat:$app_id|cat:".addCheckbox(2, '"|cat:"userRightsCB["|cat:$app_id|cat:"]["|cat:$DF_ID|cat:"][2]')" ?>
						</script>

						<tr <? if ($smarty.foreach.folderLoop.iteration % 2) == 0 ?>bgcolor="<? #oddRowsColor#?>"<?else?>bgcolor=#FFFFFF<? /if ?>>
							<td class="catalogRowSmall smallFont" style="padding-left: <? $padding|cat:"px" ?>"><img border="0" src="../../../common/html/classic/images/folder_open.gif" width="14" height="12">&nbsp;<? $folderData->NAME|trunc_str:30|htmlsafe:true:true ?></td>
							<td align=center class=leftBorder><input onClick="updateMultiAppFolderCb( this, '<? $DF_ID ?>', '<? $app_id ?>', 0 )" ID="userRightsCB[<? $app_id ?>][<? $DF_ID ?>][0]" name="userRightsCB[<? $app_id ?>][<? $DF_ID ?>][0]" type="checkbox" value="1" <? switchedOutput val=$userRightsCB.$app_id.$DF_ID.0 true_val=1 str1="checked" ?>></td>
							<td align=center><input onClick="updateMultiAppFolderCb( this, '<? $DF_ID ?>', '<? $app_id ?>', 1 )" ID="userRightsCB[<? $app_id ?>][<? $DF_ID ?>][1]" name="userRightsCB[<? $app_id ?>][<? $DF_ID ?>][1]" type="checkbox" value="1" <? switchedOutput val=$userRightsCB.$app_id.$DF_ID.1 true_val=1 str1="checked" ?>></td>
							<td align=center><input onClick="updateMultiAppFolderCb( this, '<? $DF_ID ?>', '<? $app_id ?>', 2 )" ID="userRightsCB[<? $app_id ?>][<? $DF_ID ?>][2]" name="userRightsCB[<? $app_id ?>][<? $DF_ID ?>][2]" type="checkbox" value="1" <? switchedOutput val=$userRightsCB.$app_id.$DF_ID.2 true_val=1 str1="checked" ?>></td>
						</tr>

				<? foreachelse ?>
					<tr>
						<td colspan="4" class="noentries" align="center"><? $kernelStrings.app_noentrieis_text|htmlsafe:true:true ?></td>
					</tr>
				<? /foreach ?>

				<? /if ?>

			<tr>
				<td>&nbsp;</td>
				<td colspan=3 class=leftBorder>&nbsp;</td>
			</tr>

		<? /foreach ?>

	</table>

</div>